#!/bin/sh /etc/rc.common

START=93
USE_PROCD=1
 
get_config() {
	config_get_bool enabled $1 enabled 1
}
aihelper_prepare() {
    killall aihelper 2>/dev/null
}

start_service() { 
	config_load aihelper
	config_foreach get_config aihelper
	[ $enabled != 1 ] && return 1
	procd_open_instance
	procd_set_param command /usr/sbin/aihelper
	procd_set_param stderr 1
	procd_set_param respawn
	procd_close_instance
}

stop_service() {
    aihelper_prepare
}